package com.tcheung.entity;

import java.util.ArrayList;
import java.util.List;

/**
 * Document
 *
 * @author: zhangteng
 * @time: 2014/11/29 17:45
 */
public class Document {

    // 文档编号
    private int docNum;

    // 文档内容
    private String content;

    // 相似度
    private Double similarity;

    // 所包含的关键词集合
    List<TFEntity> tfEntityList = new ArrayList<TFEntity>();

    // 出现最多的单词数量
    private int maxTermCount;

    public int getDocNum() {
        return docNum;
    }

    public void setDocNum(int docNum) {
        this.docNum = docNum;
    }

    public String getContent() {
        return content;
    }

    public String getContent(int count) {
        return content.substring(0, count);
    }

    public void setContent(String content) {
        this.content = content;
    }

    public Double getSimilarity() {
        return similarity;
    }

    public void setSimilarity(Double similarity) {
        this.similarity = similarity;
    }

    public List<TFEntity> getTfEntityList() {
        return tfEntityList;
    }

    public void setTfEntityList(List<TFEntity> tfEntityList) {
        this.tfEntityList = tfEntityList;
    }

    public int getMaxTermCount() {
        return maxTermCount;
    }

    public void setMaxTermCount(int maxTermCount) {
        this.maxTermCount = maxTermCount;
    }

    public void addTFEntity(TFEntity tfEntity) {
        this.tfEntityList.add(tfEntity);
    }
}
